package collections;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @Author: DRevelation
 * @Date: 2022/4/7 15:53
 */
public class AddingGroups {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
//        list.add(6); // UnsupportedOperationException
        List<Integer> list2 = new ArrayList<>(list);
        list2.add(6);
    }
}
